/**
 *
 *  License: http://www.apache.org/licenses/LICENSE-2.0
 *  Home page: https://gitee.com/linlurui/service-abc
 *  Note: dto build on java, include the jdk1.8+ compiler symbol (and yes,
 *  I know the difference between language and runtime versions; this is a compromise).
 * @author linlurui
 * @Date Date: 2019-02-10
 */


package abc.model;



import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.UUID;

@Data
@Schema(description="请求响应")
public class ResponseData<T> implements IResponseData<T> {

    private static final long serialVersionUID = 4016329280384376059L;

    public ResponseData() {
        pageInfo = new PageInfo();
        status = 0;
        message = "OK";
    }

    public ResponseData(int status, String msg) {
        pageInfo = new PageInfo();
        status = status;
        message = msg;
    }

    public ResponseData(int status, String msg, T data) {
        pageInfo = new PageInfo();
        status = status;
        message = msg;
        this.data = data;
    }

    @Schema(description = "响应状态")
    private int status;

    @Schema(description = "响应消息")
    private String message;

    @Schema(description = "返回数据")
    private T data;

    @Schema(description = "分页信息")
    private PageInfo pageInfo;

    @Schema(description = "当前请求UUID")
    private UUID uuid;
}

